// import {MaterialType,  CategoryType} from './dict'
/**
 * 列表字段
 */
export const fileds = [
  {
    name: 'code',
    label: '商品编号'
  }, {
    fieldType:'img',
    label: '图片'
  }, {
    name: 'name',
    label: '商品名称'
  }, {
    name: 'categoryName',
    label: '商品类别',
  }, {
    name: 'price',
    label: '商品价格'
  }, {
    name: 'stockQuantity',
    label: '商品数量'
  }, {
    name: 'status',
    label: '发布状态',
    fieldType:'switch',
    fixed: "right",
    data: {
        '0': '未发布',
        '1': '已发布'
      }
  }
]

/**
 * 表单字段
 */
export const formFileds = [
 {
    name: 'code',
    label: '商品编号',
    required: true
  }, {
    name: 'name',
    label: '商品名称',
    required: true,
    maxlength: 128
  }, {
    name: 'categoryName',
    label: '商品类别',
    required: true,
    fieldType: 'dataSource',
    data: 'category'
    
  }, {
    name: 'description',
    label: '商品描述',
    fieldType:'textarea',
    maxlength: 256
  }, {
    name: 'price',
    label: '商品价格',
    required: true
  }, {
    name: 'stockQuantity',
    label: '商品数量'
  }
]